package test30;

import java.util.Scanner;

public class Task3 {

	static void Count()
	{
		int ans = 0;
		String s;
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		char[] Chars = s.toCharArray();
		for(char i:Chars) {
			if(i>='a'&&i<='z')ans++;
		}
		System.out.println(ans);
	}
	public static void main(String[] args) {
		
		Count();
	}
}
